Auto Resize Height of Textarea on Change

Quick fix to auto resize a <textarea /> if the input starts to go outside the pre-determined height with Javascript

<textarea onChange={(e) => {
  console.log('scroll h, ', e.target.scrollHeight);
  e.target.style.height = e.target.scrollHeight + 'px'
}}/>
textarea{
	overflow: hidden;
	resize: vertical;
}